<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ page import="cn.lianwei.yonyong.utils.*,java.util.*,cn.lianwei.yonyong.pojo.*" %>
<%@ page import="org.springframework.web.context.request.SessionScope" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<% String path = request.getContextPath();

    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>消息</title>
    <link href="<%=basePath %>static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        .tab, a {
            cursor: pointer;
        }

        .active {
            color: blue;
            border-bottom: 1px solid blue;
        }
        #keyword {
            width: 50% !important;
            display: inline-block;
        }


    </style>
</head>
<body>


<div class="row">
    <div class="col-md-1"></div>
    <div class="col-md-9">
        <div class="table-responsive" align="center">
            <h3 align="center">
                <span data-tab="xs" class="tab active">学生信息</span>
                <span data-tab="kcDiv" class="tab">课程信息</span>
                <span data-tab="cjDiv" class="tab">成绩信息</span>
            </h3>
            <div id="xs" class="content">
                <div class="row">
                    <div class="col-md-5">
                        <div class="form-group">
                            <input type="text" class="form-control" id="keyword" placeholder="请输入学号或姓名"/>
                            <button type="button" class="btn btn-default" onclick="listXsInfo()">查询</button>
                            <button type="button" class="btn btn-default" onclick="xsExport()">全量导出</button>
                        </div>
                    </div>
                </div>
                <table class="table" align="center">
                </table>
            </div>
            <div id="kcDiv" style="display: none" class="content">

                <table class="table" align="center">
                    <thead>
                    <th>课程名称</th>
                    <th>课程代码</th>
                    <th>操作</th>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
                <input type="button" class="btn btn-primary btn-lg btn-block" value="添加课程">
            </div>
            <div id="cjDiv" style="display: none" class="content">

                <table class="table" align="center">
                    <thead>
                    <th>课程代码</th>
                    <th>学号</th>
                    <th>成绩</th>
                    <th>操作</th>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
                <input type="button" class="btn btn-primary btn-lg btn-block" value="添加成绩">
            </div>
        </div>

    </div>

    <div class="col-md-2">
        <div class="form-group">
            当前账户：${rs_user.username}
        </div>
        <div class="form-group">
            <p class="help-block"><a href="http://localhost:8080">退出</a></p>
        </div>
    </div>

    <div class="modal fade" id="kcModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
         aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel"></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-7">
                            <input type="hidden" id="kcid">
                            <div class="form-group">
                                <input type="text" class="form-control" id="kcmc" width=200 placeholder="课程名称"/>
                            </div>
                            <div class="form-group">
                                <input type="text" class="form-control" id="kcdm" width=200 placeholder="课程代码"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="saveKc()">保存更改</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="cjModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
         aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel"></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-7">
                            <input type="hidden" id="cjid">
                            <div class="form-group">
                                <input type="text" class="form-control" id="cjkcdm" width=200 placeholder="课程代码"/>
                            </div>
                            <div class="form-group">
                                <input type="text" class="form-control" id="xh" width=200 placeholder="学号"/>
                            </div>
                            <div class="form-group">
                                <input type="number" class="form-control" id="cj" width=200 placeholder="成绩"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="saveCj()">保存更改</button>
                </div>
            </div>
        </div>
    </div>
</div>


<script src="<%=basePath %>static/jquery/jquery-3.3.1.min.js"></script>
<script src="<%=basePath %>static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="<%=basePath %>static/info.js"></script>

</body>
</html>